# Copyright (C) 2009 David Sugar, Tycho Softworks
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#

add_executable(minishell-concat concat.cpp)
add_dependencies(minishell-concat ucommon)
set_target_properties(minishell-concat PROPERTIES OUTPUT_NAME cat)
target_link_libraries(minishell-concat ${USES_UCOMMON_LIBRARIES})

add_executable(minishell-copy copy.cpp)
add_dependencies(minishell-copy ucommon)
set_target_properties(minishell-copy PROPERTIES OUTPUT_NAME cp)
target_link_libraries(minishell-copy ${USES_UCOMMON_LIBRARIES})

add_executable(minishell-head head.cpp)
add_dependencies(minishell-head ucommon)
set_target_properties(minishell-head PROPERTIES OUTPUT_NAME head)
target_link_libraries(minishell-head ${USES_UCOMMON_LIBRARIES})

add_executable(minishell-hexdump hexdump.cpp)
add_dependencies(minishell-hexdump ucommon)
set_target_properties(minishell-hexdump PROPERTIES OUTPUT_NAME hexdump)
target_link_libraries(minishell-hexdump ${USES_UCOMMON_LIBRARIES})

add_executable(minishell-link link.cpp)
add_dependencies(minishell-link ucommon)
set_target_properties(minishell-link PROPERTIES OUTPUT_NAME ln)
target_link_libraries(minishell-link ${USES_UCOMMON_LIBRARIES})

add_executable(minishell-list list.cpp)
add_dependencies(minishell-list ucommon)
set_target_properties(minishell-list PROPERTIES OUTPUT_NAME ls)
target_link_libraries(minishell-list ${USES_UCOMMON_LIBRARIES})

add_executable(minishell-move move.cpp)
add_dependencies(minishell-move ucommon)
set_target_properties(minishell-move PROPERTIES OUTPUT_NAME mv)
target_link_libraries(minishell-move ${USES_UCOMMON_LIBRARIES})

add_executable(minishell-remove remove.cpp)
add_dependencies(minishell-remove ucommon)
set_target_properties(minishell-remove PROPERTIES OUTPUT_NAME rm)
target_link_libraries(minishell-remove ${USES_UCOMMON_LIBRARIES})

add_executable(minishell-tail tail.cpp)
add_dependencies(minishell-tail ucommon)
set_target_properties(minishell-tail PROPERTIES OUTPUT_NAME tail)
target_link_libraries(minishell-tail ${USES_UCOMMON_LIBRARIES})

add_executable(minishell-tee tee.cpp)
add_dependencies(minishell-tee ucommon)
set_target_properties(minishell-tee PROPERTIES OUTPUT_NAME tee)
target_link_libraries(minishell-tee ${USES_UCOMMON_LIBRARIES})

add_executable(minishell-wordcount wordcount.cpp)
add_dependencies(minishell-wordcount ucommon)
set_target_properties(minishell-wordcount PROPERTIES OUTPUT_NAME wc)
target_link_libraries(minishell-wordcount ${USES_UCOMMON_LIBRARIES})

install(TARGETS minishell-wordcount minishell-remove minishell-tee minishell-head minishell-tail minishell-move minishell-copy minishell-link minishell-concat minishell-hexdump minishell-list DESTINATION ${CMAKE_INSTALL_BINDIR})


